{extend name="layout/index" /}

{block name="title"}
<title>用户列表</title>
{/block}
{block name="adminUser"}
<a href="#" data-toggle="dropdown">
	<img src="/admin/images/user-4.png" alt="user-image" class="img-circle img-inline userpic-32" width="28" />
	<span>
		{$adminUser}
		<i class="fa-angle-down"></i>
	</span>
</a>
{/block}
{block name="content"}
	<div class="panel panel-default">
				<div class="panel-heading">
					<h3 class="panel-title">用户列表</h3>
					<form action="{:url('admin/userList')}" method="get">

					<!-- <label style="width:10%; position:relative;left:200px;">
					<select name="example-4_length" aria-controls="example-4" class="form-control input-sm">
					<option selected value="10">----请选择----</option>
					<option value="10">----一周前----</option>
					<option value="25">----一个月前----</option>
					<option value="25">----三个月前----</option>
					</select> 
					</label> -->

					<label style="width:20%;position:relative;top:12px;left:400px;"><input class="form-control input-sm" placeholder="Search" aria-controls="example-4" type="search" name="phone"></label>
					<input type="submit" value="搜索" class="btn btn-info btn-single "/>
					</form>
					<div class="panel-options">
						<a href="#" data-toggle="panel">
							<span class="collapse-icon">&ndash;</span>
							<span class="expand-icon">+</span>
						</a>
						<a href="#" data-toggle="remove">
							×
						</a>
					</div>
				</div>
				<div class="panel-body">
					
					<div id="example-2_wrapper" class="dataTables_wrapper form-inline dt-bootstrap no-footer"><table class="table table-bordered table-striped dataTable no-footer" id="example-2" role="grid" aria-describedby="example-2_info">
						<thead>
							
							<tr role="row">
								<!-- <th class="no-sorting sorting_disabled" rowspan="1" colspan="1" style="width: 13px;" aria-label="">
									<div class="cbr-replaced">
									<div class="cbr-input">
									<input class="cbr cbr-done" type="checkbox">
									</div>
									<div class="cbr-state"><span></span></div>
									</div>
								</th> -->
							<!-- 	<th class="sorting_desc" tabindex="0" aria-controls="example-2" rowspan="1" colspan="1" style="width: 152px;" aria-label="Student Name: activate to sort column ascending" aria-sort="descending">头像</th> -->
								<!-- <th class="sorting" tabindex="0" aria-controls="example-2" rowspan="1" colspan="1" style="width: 191px;" aria-label="Average Grade: activate to sort column ascending">用户名</th> -->
								<th class="sorting" tabindex="0" aria-controls="example-2" rowspan="1" colspan="1" style="width: 100px;" aria-label="Average Grade: activate to sort column ascending">注册时间</th>
							<!-- 	<th class="sorting" tabindex="0" aria-controls="example-2" rowspan="1" colspan="1" style="width: 191px;" aria-label="Curriculum / Occupation: activate to sort column ascending">邮箱</th> -->
								<th class="sorting" tabindex="0" aria-controls="example-2" rowspan="1" colspan="1" style="width: 159px;" aria-label="Actions: activate to sort column ascending">手机号</th>
								<th class="sorting" tabindex="0" aria-controls="example-2" rowspan="1" colspan="1" style="width: 100px;" aria-label="Actions: activate to sort column ascending">当前积分</th>
								<th class="sorting" tabindex="0" aria-controls="example-2" rowspan="1" colspan="1" style="width: 120px;" aria-label="Actions: activate to sort column ascending">余额</th>
								<!-- <th class="sorting" tabindex="0" aria-controls="example-2" rowspan="1" colspan="1" style="width: 100px;" aria-label="Actions: activate to sort column ascending">优惠券</th> -->
								<th class="sorting" tabindex="0" aria-controls="example-2" rowspan="1" colspan="1" style="width: 100px;" aria-label="Actions: activate to sort column ascending">已付费视频数目</th>
								<th class="sorting" tabindex="0" aria-controls="example-2" rowspan="1" colspan="1" style="width: 100px;" aria-label="Actions: activate to sort column ascending">已收藏视频数目</th>
								<th class="sorting" tabindex="0" aria-controls="example-2" rowspan="1" colspan="1" style="width: 100px;" aria-label="Actions: activate to sort column ascending">白名单</th>
								<th class="sorting" tabindex="0" aria-controls="example-2" rowspan="1" colspan="1" style="width: 80px;" aria-label="Actions: activate to sort column ascending">操作</th>
								</tr>
							
						</thead>
						
						<tbody class="middle-align">
						{foreach name="user" id="vo"}							
						<tr role="row" class="odd">
								<!-- <td class="">
									<div class="cbr-replaced"><div class="cbr-input"><input class="cbr cbr-done" type="checkbox"></div><div class="cbr-state"><span></span></div></div>
								</td> -->
								<!-- <td class="sorting_1"></td> -->
								<!-- <td class=""></td> -->
								<td class="">{$vo.addtime | date="y-m-d H:i:s",###}</td>
								<!-- <td class=""></td> -->
								<td class="">{$vo.phone}</td>
								<td class="">{$vo.integralcount}</td>
								<td class="">{$vo.num}</td>
								<td class="">{$vo.pay_num}</td>
								<td class="">{$vo.collect_num}</td>
								<td class="">
								{if condition="$vo.status == 1"}
									<a  href="{:url('Chat/delWhitelist')}?id={$vo.id}" class="btn btn-danger btn-sm btn-icon icon-left">
										移出黑名单
									</a>
									{elseif condition="$vo.status != 1"/}<a href="{:url('Chat/addWhitelist')}?id={$vo.id}" class="btn btn-danger btn-sm btn-icon icon-left">加入到黑名单</a>{/if}
									</td>
								
								<td>
									<!-- <a href="{:url('admin/userEdit')}" class="btn btn-secondary btn-sm btn-icon icon-left">
										修改
									</a> -->
									
									<a href="{:url('admin/userDelete')}?id={$vo.id}" class="btn btn-danger btn-sm btn-icon icon-left">
										删除
									</a>
									
								</td>
							</tr>
						{/foreach}
						</tbody>
					</table><div class="row"><div class="col-xs-6"><div class="dataTables_info" id="example-2_info" role="status" aria-live="polite"></div></div>
					<div class="col-xs-6">
					<div class="dataTables_paginate paging_simple_numbers" id="example-2_paginate">
					{$user->render()}
					</div></div></div></div>
					
				</div>
			</div>
{/block}